//
//  UIImageView.m
//  FVGravityView
//
//  Created by 李帅兵 on 14-5-21.
//
//

#import "UIImageView+Tranform3D.h"
#import <QuartzCore/CATransform3D.h>
@implementation UIImageView (Tranform3D)
-(void)setRotation:(CGFloat)degress
{
    CATransform3D tranform = CATransform3DIdentity;
    tranform.m34 = 1.0/100;
    CGFloat radiants = degress/360*M_PI;
    tranform = CATransform3DRotate(tranform, radiants, 1.0f, 0.0f, 0.0f);
    CALayer *layer = self.layer;
    layer.anchorPoint = CGPointMake(0.5, 0.5);
    layer.transform = tranform;
}
@end
